<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <title>Document</title>
</head>

<body>

</body>
<script type="text/javascript">
    // 输入一个三位数，如果是水仙花数，输出YES，否则的话，输出NO;
    //所谓的水仙花数是指 每一位的数字立方和等于这位数本身。例如 153 = 1^3+5^3+3^3
    var num = +prompt('请输入三位正数：');//123
    // var num = 153;
    // console.log(parseInt(num/100));
    // console.log(parseInt(num/10)%10);
    // console.log(num%10);
    var g = parseInt(num/100)
    var s = parseInt((num/10)%10)
    var b = num%10
    if((g * g * g  + s * s * s + b * b * b) === num){
        console.log("水仙花");
    }else{
        console.log("不是水仙花");
    }
</script>

</html>